import request from "@/utils/request";

// 新增入住账单
export function createHouseBill(data) {
  return request({
    url: "/enterprise/bill/houseBill/create",
    method: "post",
    data: data
  });
}

// 入住账单列表
export function listHouseBill(params) {
  return request({
    url: "/enterprise/bill/houseBill/list",
    method: "get",
    params: params
  });
}


// 入住账单详情
export function getHouseBill(id) {
  return request({
    url: "/enterprise/bill/houseBill/" + id,
    method: "get"
  });
}

// 未生效账单列表
export function listInvalidHouseBill(params) {
  return request({
    url: "/enterprise/bill/houseBill/list/invalid",
    method: "get",
    params: params
  });
}

// 注销账单
export function logoutHouseBill(id) {
  return request({
    url: "/enterprise/bill/houseBill/logout/" + id,
    method: "get"
  });
}

// 拆分账单
export function disassembleHouseBill(data) {
  return request({
    url: "/enterprise/bill/houseBill/disassemble",
    method: "post",
    data: data
  });
}

// 业主账单 线下缴费
export function HouseBillOwnerOfflinePayment(data) {
  return request({
    url: "/enterprise/bill/houseBill/offlinePayment",
    method: "post",
    data: data
  });
}

// 获取账单列表
export function calculateHouseBill(data) {
  return request({
    url: "/enterprise/bill/houseBill/calculate",
    method: "post",
    data: data
  });
}

// 查询可生成账单订单列表
export function billList(params) {
  return request({
    url: "/enterprise/order/order/addBillList",
    method: "get",
    params: params
  });
}

